<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%-- JSTL表达式（判断，循环，输出） --%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%-- 方法表达式（字符串截取，替换） --%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新闻中心</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge，chrome=1">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta name="renderer" content="webkit">
    <meta name="baidu-site-verification" content="R9XA5lWxu2"/>
    <meta name="author" content="图腾">
    <meta name="keywords" content="图腾">
    <meta name="description" content="图腾">
    <link rel="stylesheet" href="<%=basePath%>plugins/swiper/css/swiper.min.css">
    <link rel="stylesheet" href="<%=basePath%>css/ys.css">
</head>
<body>

<jsp:include page="${basePath}/common.jsp" />

<div class="heard-box">
    <div class="container">
        <div class="heard-title">
            <img src="<%=basePath%>images/h3.png">
        </div>
        <img class="heard-img news" src="<%=basePath%>images/h4.png">
    </div>
</div>

<div class="container">
    <%--<a href=""><img src="/images/write.png" class="pull-right"></a>--%>
    <div class="tag-box">
        <a href="javascript:;" onclick="window.history.go(-1)"><span class="arrow"></span><span class="title">新闻</span></a>
    </div>
</div>

<div class="news-wrap ">
    <ul id="news">

    </ul>

    <div class="text-center">
        <a style="color: #222222" href="javascript:;" class="btn-news-more text-center" onclick="load()" id="loadNews">加载更多</a>
    </div>
</div>

<jsp:include page="${basePath}/footer.jsp" />

<script src="<%=basePath%>js/jquery.min.js"></script>
<script src="<%=basePath%>plugins/swiper/js/swiper.min.js"></script>
<script src="<%=basePath%>js/modal_build.js"></script>
<script src="<%=basePath%>js/modal_index.js"></script>
<script>
    document.documentElement.style.fontSize = 200 / 1920 * document.documentElement.clientWidth + 'px';
    window.onresize = function () {
        document.documentElement.style.fontSize = 200 / 1920 * document.documentElement.clientWidth + 'px';
    };
    var page = 0;

    load();

    function load(){
        page++;
        $.post("<%=basePath%>article/getNewss", {page: page}, function(res){
            $("#news").append(res);
        }, 'html');
    }
</script>
</body>
</html>